home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / me_cd22.zip / DOC.ZIP / PACKAGE.DOC < prev    next >
Text File  |  1992-04-27  |  37KB  |  849 lines

  1. ========================================================================
  2. ==        ME2 Packages             Craig Durland  10/91 ==
  3. ========================================================================
  4.  
  5. Here is some documentation on some of the packages of Mutt programs I
  6. use.
  7.  
  8.              Copyright 1991 Craig Durland
  9.     Distributed under the terms of the GNU General Public License.
  10.   Distributed "as is", without warranties of any kind, but comments,
  11.            suggestions and bug reports are welcome.
  12.  
  13. ========================================================================
  14. ==            Customizing me2.mut                  ==
  15. ========================================================================
  16.  
  17. Overview:
  18.   When ME2 runs, it tries to load me2.mco.  The me2.mco shipped with ME2
  19.   tries to load several files:
  20.   osstuff.mco : OS related stuff.
  21.   ./mext.mco : Directory local ME2 extensions
  22.   myme.mco : Your personal ME2 extensions.
  23.  
  24.  
  25. Package:    myme.mut
  26. How loaded: By me2.mut as part of start up.
  27. Description:
  28.   This is the file that you put your personal extensions to ME2 in.
  29.     This is the stuff you don't want to everybody to have to use.  You
  30.     should put myme.mco in a spot that that is only in your ME2 path
  31.     (such as your home directory).
  32.   A copy of the file I use is in ../mutt/myme.mut.
  33. Functions you might to call:
  34.   command-line-done (bool it-has-been-processed)
  35.     Call this if you have processed the command line.
  36.  
  37. Package:  osstuff.mco
  38. See:  OS Stuff below.
  39.  
  40. Package:    ./mext.mut
  41. How loaded: By me2.mut as part of start up.
  42. Description:
  43.   If this file is the current directory when ME2 starts, me2.mut will
  44.     load it.  Use it to hold stuff you want ME2 to know about only in
  45.     this directory.
  46.   For example, I have a bunch of Mutt code to help me design bicycles.
  47.     I could autoload it but then I would have to type something
  48.     everytime I wanted to work on a bicycle.  Since I do all the work in
  49.     the bicycle directory, I just put the code in bicycle/myme.mco and
  50.     when I run ME2, it is loaded automatically.
  51.  
  52. ========================================================================
  53. ==            Mark Rings                      ==
  54. ========================================================================
  55.  
  56. Package:    markring.mut
  57. How loaded: part of me2.mut, turned on for interactive buffers
  58. Description:
  59.   Mark rings provide a way to mark multiple places in a buffer so you
  60.   can jump to them easily.  Note that they can't span buffers.  Up to 4
  61.   marks (easily changable in markring.mut) are kept, as more are set,
  62.   the ring wraps around and reuses the older marks.
  63. Functions:
  64.   markring-push        M-C-p or F-9
  65.     Push the dot into the end of the ring.
  66.   markring-pop        M-p
  67.     Goto the next mark in the ring.
  68.   markring-delete    Not bound
  69.     Remove the most recently popped mark from the ring.
  70.   markring-init        Not bound
  71.     Use this if a markring was not setup in this buffer (it normally is)
  72.     or you want to remove all marks from the ring and start over.
  73.  
  74. ========================================================================
  75. ==            Mode Support                      ==
  76. ========================================================================
  77.  
  78. Package:    alamode.mut
  79. How loaded: part of me2.mut
  80. Description:
  81.   This is the package that turns on modes.  Here is how it works (in the
  82.     order that things happen):
  83.   - When a interactive buffer is created, if the environment variable
  84.     MEMODE is set, "-mode" is appended to it and a call is made to that
  85.     function.  For example, if MEMODE is set to "mail", everytime a
  86.     interactive buffer is created, "mail-mode" is called for that
  87.     buffer.  If the mode doesn't exist, ME2 will complain.
  88.   - If there is no MEMODE variable, the buffer name is looked at.  The
  89.     list of modes is looked at to see if any of the modes fits the name.
  90.     (You can change the list with auto-mode-list (see below).)  Here are
  91.     the default modes:
  92.       Extension        Program Run
  93.       ---------        -------    ---
  94.     .c        c-mode
  95.     .h        c-mode
  96.     .mut        mutt-mode
  97.     .doc        text-mode
  98.     .txt        text-mode
  99.     If the program is not there, ME2 will complain, but you might not
  100.       see it because other things will be written to the command line
  101.       after the error message (like "[Read 10 lines]").  No harm is done
  102.       if the mode is not run.
  103.     If there are no matches, the default-major-mode is run (see below).
  104.   - When a file is read into a interactive buffer, the first line of the
  105.     buffer is looked at.  If it contains text of the form "-*-foo-*-",
  106.     foo-mode is run.
  107. Functions:
  108.   default-major-mode    Not bound
  109.     Set the default major mode.  This is the mode set for a interactive
  110.       buffer when no other mode seems to fit.
  111.     For example:  If you want text mode to be the default:
  112.     (default-major-mode "text").  The "-mode" is appended when the mode
  113.       needs to be run.
  114.     The mode might be changed when the file is read in (see above).
  115.     The default is "none".
  116.   (auto-mode-list (bool append)(string mode-re mode-name ...)
  117.     Append or Prepend to the list of modes.
  118.     Input:
  119.       append:  TRUE if you want your list of modes to be appended (ie
  120.     searched last) to the list of modes.  There are two reasons you
  121.     might want to do this:  If you have not-very-often used mode,
  122.     putting it a the end of the list means a quicker search time for
  123.     the more often used modes.  If you want to override one of the
  124.     defaults, prepend so your new mode will be found first.
  125.       mode-re:
  126.         This is a regular expresion that the buffer name is tested with.
  127.       If there is a match, mode-name is run.  For example, if you
  128.       want to test for the extension foo, use '.*\.foo$'.  The
  129.       single quote is important.  This re matches any string that
  130.       ends with the characters ".foo".  Note:  the re is not a
  131.       searching re - it is inplace regular expression match.  That
  132.       is why you need the .* at the start.
  133.     Notes:
  134.       The mode-re is used to match the buffer name NOT the file
  135.         name.  Since I do the match at buffer create time, I don't
  136.         have a file name.  If you want to match file names, you will
  137.         need to change the call to set-mode from buffer-created-hook
  138.         to file-read-hook.  I used buffer-created-hook because then
  139.         I can use (switch-to-buffer) and have the mode set without
  140.         reading in a file.
  141.       My Unix mailer uses temp files named "/tmp/Re<digits>".  An re
  142.         to match that is 'Re[0-9]+$'.  Then, whenever mail uses ME
  143.         to edit mail, you can edit with your favorite mail mode.
  144.       mode-name:  The name of the mode you want to run if there is a
  145.         match.  If you want c mode, use "c".  The "-mode" is appended
  146.     when the mode needs to be run.
  147.     Here is the default:
  148.       (auto-mode-list TRUE
  149.     '.*\.c$'    "c"
  150.     '.*\.h$'    "c"
  151.     '.*\.mut$'    "mutt"
  152.     '.*\.doc$'    "text"
  153.     '.*\.txt$'    "text"
  154.       )
  155.     If you want to get rid of mode, prepend it and use none.  For
  156.       example, if you don't like c mode, use
  157.       (auto-mode-list FALSE '.*\.c$' "none"  '.*\.h$' "none") and c-mode
  158.       won't be called.  Of course, you could also just remove cmode.mco
  159.       and achive the same result.
  160.     If you want to get rid of all modes, use 
  161.       (auto-mode-list FALSE '.' "none").  This will set every buffer to
  162.       none-mode.
  163. Notes:
  164.   While using the mode-re's gives a lot of flexability, I wonder about
  165.     the speed hit.  Knowing how all this is implemented, it seems like
  166.     all those regular expression tests has got to take a long time.  It
  167.     doesn't seem to on my machine (but its a real fast machine).  Does
  168.     anyone use anything but the extension?  If not, it might make more
  169.     sense to just have a list of (extension, mode) pairs.
  170.   Sigh, I found a good use for the full name.  See my comments about
  171.     mail in mode-re above.
  172.  
  173. ========================================================================
  174. ==            C Mode                          ==
  175. ========================================================================
  176.  
  177. Package:    cmode.mut
  178. How loaded: 
  179.   Autoloaded when a buffer with extension ".c" or ".h" created or when a
  180.   file is read in with "-*-c-*-" in the first line.
  181. Modes:
  182.   Major: C
  183.   Minor: none or comment
  184. Description:
  185.   Electric C mode.  A collection of routines I've found useful when
  186.   editing C code.  It is turned on when ever you edit a .c or .h file.
  187.   Helps with comments, backspacing over tabs, { and a few others.
  188.  
  189.     Electric C mode is designed to help keep your C code formatted "as
  190.   you code".  You don't have to remember anything special - as you type,
  191.   what you type is looked at and may trigger certain actions.  This is a
  192.   minimalist C mode ment to enable you to keep your C code formatted in
  193.   a consistant manner.  The only extensive help is for comments.
  194.  
  195. Characters that trigger formatting:
  196.   Enter (return):  Matches the indent level of the previous line.
  197.   "{": When a "{" is pressed, one of the following will happen:
  198.     - If the space bar is pressed, "{ }" is generated and the cursor is
  199.       put between the braces.
  200.     - If Enter is pressed:
  201.         And the rest of the line is blank, you will get something like:
  202.          if (a) {        or  if (a)
  203.            cursor        {
  204.          }              cursor
  205.                  }
  206.         depending on where the "{" was.  The cursor is indented by
  207.        the amount specified by "indent-level".
  208.       If the rest of the line was not blank, a newline-and-indent is
  209.        done and the text after the { is indented.
  210.         For example:
  211.          if (a) foo(): if a "{ Enter" is done before the foo()
  212.          you will get:
  213.          if (a) {
  214.            foo()
  215.     - Otherwise, a "{" is inserted.
  216.   Backspace:  Behaves like backspacing over spaces even when backspacing
  217.     over tabs.
  218.   Newline (control-J):  Used to give some white space after a variable
  219.     declaration block.  The cursor is left at the same column as the
  220.     start of the declarations.
  221.       int j;    => int j;
  222.             blank line
  223.             cursor
  224.   "/": Comment assistance.
  225.     - If "*" is pressed and the rest of the line is blank and there is
  226.       text to the left of the "/", "/* */" is generated and the cursor
  227.       is put in the middle of the comment.  This is for end of line
  228.       comments like:  if (a) foobar(); /* comment */
  229.     - If "*" is pressed and the entire line is blank, block comment mode
  230.       is entered.  In this mode, your comment will autowrap at the
  231.       comment-wrap-column.  When you hit Enter or autowrap, stars are
  232.       put in the proper place, whitespace is added to match the previous
  233.       comment line.  If you press Enter "/", comment mode will
  234.       terminate.  "*/" or "*" blanks "/" will also terminate comment
  235.       mode.  If you want to get out of comment mode without using the
  236.       above, press M-; or execute "nocomment".
  237.       Examples:
  238.          /*
  239.               * Comment
  240.           *   Indented a bit
  241.           *   Next line follows the indent.
  242.           */
  243.          /*
  244.          ** Another comment style
  245.          */
  246.     - Otherwise, a "/" is inserted.
  247.   Meta-;
  248.     If in block comment mode, turn off comment mode.
  249.     If the cursor is on a line that is part of a block comment, start up
  250.       block comment mode.  This is very handy for adding to an existing
  251.       block comment.
  252.   Meta-J:  Format a C block comment.
  253.     If you munge a block comment and want to set it right, use this.
  254.     This formats all the lines between the dot and mark inclusive.
  255.     Put the region around the comment (or the part of the comment you
  256.       want to format) and press M-j.  The comment is commented in the
  257.       format of comment mode.
  258.     Notes:
  259.       To make sure that line breaks are preserved, insert blank lines at
  260.     the breaks.  The blank lines will be deleted after the comment
  261.     is formatted.
  262.       To change the indent level of the block, indent the first line of
  263.     the region to where you want.
  264.   Control-U Meta-J: Format a C boxed comment.
  265.     Same as format block comment except the comment is boxed:
  266.      /********************************
  267.       *   Comment            *
  268.       ********************************/
  269.     You can convert between boxed and block comments by just reformatting.
  270.  
  271. Constants (in cmode.mut) that can be modified to change formating style:
  272.   Enter-key-action
  273.     Set this to "newline-and-indent" or "newline".  One of these is
  274.       called when the enter key is presses.
  275.   INDENT-LEVEL
  276.     This is the number of spaces to indent a block ie :
  277.     {
  278.         <block indent>
  279.     }
  280.     Default is 2.
  281.   COMMENT-WRAP-COLUMN
  282.     The column to word wrap at when in comment mode.  The default is 76.
  283.   TAB-SIZE
  284.     How many spaces to use when tab is hit.  The default is 0 which
  285.     means use hard tabs (which look like 8 spaces).
  286.   C-STARS
  287.     The number of stars to use at the left when in comment mode.
  288.     Use " *" if you use this style (1) (the default):
  289.     /*
  290.      *
  291.      */
  292.     Use "**" if you use this style (2):
  293.     /*
  294.     **
  295.     */
  296.   COMET
  297.     Match this with C-STARS:
  298.     Use " */" for style (1) and "*/" for style (2).
  299.  
  300.   BOXED-COMMENT-SPACE
  301.     The number of blank lines before and after text in boxed comment.
  302.     Default is 1.
  303.   BOXED-COMMENT-TRAILING-BLANKS
  304.     Blanks between text and *.  Default is 1.
  305.   BOXED-COMMENT-EDGE-STARS
  306.     You probably want to match this with C-STARS.  Use "*" or "**".
  307.  
  308. System Variables
  309.   tab-size
  310.     This is set to the constant tab-size.  You can change this with
  311.       c-mode-hook.
  312.   word-wrap
  313.     When in comment mode, word-wrap is set to the comment-wrap-column.
  314.       When commant mode ends, it is reset to 0.
  315.  
  316. Buffer Variables
  317.   "comment-offset" (number)
  318.  
  319. Hooks
  320.   c-mode-hook
  321.     This hook is called (if it exists) after c mode has initialized
  322.       itself.  With this hook you can override settings or do those few
  323.       extra things you wished c mode set up.  For example, this is the
  324.       perfect place to set the tab-size to what you think it should be.
  325.     This is a program you add to your code (typically in myme.mut).
  326.     Use this hook if you don't want to modify the constants in
  327.       cmode.mut.
  328.  
  329. Customizing (usually done in c-mode-hook)
  330.   c-mode-etc (int indent-level comment-wrap-column) (string c-stars comet)
  331.     Call this routine to change routine stuff.
  332.     Default (done by c-mode) is 
  333.     (c-mode-etc INDENT-LEVEL COMMENT-WRAP-COLUMN C-STARS COMET)
  334.   c-mode-boxed (int boxed-comment-space boxed-comment-trailing-blanks)
  335.      (string boxed-comment-edge-stars)
  336.     Use this to change the boxed comment style.
  337.     Default (done by c-mode) is 
  338.       (c-mode-boxed BOXED-COMMENT-SPACE BOXED-COMMENT-TRAILING-BLANKS
  339.             BOXED-COMMENT-EDGE-STARS)
  340.  
  341. ========================================================================
  342. ==        More Help For C Programming                  ==
  343. ========================================================================
  344.  
  345. Package:    cstuff.mut
  346. How loaded: Manually
  347. Description:
  348.   A few routines I didn't feel like integrating into C mode.
  349. Functions:
  350.   end-slide        M-`
  351.     Slide all text to the right of the cursor so that the last character
  352.     on the line is in column 78.  You can use C-u<column> to override
  353.     the 78 or just change the constant in cstuff.mut.  This is real
  354.     handy if have a bunch of one line comments that you want to end in
  355.     same column.  For example:
  356.     switch (foo)
  357.     {
  358.       case x:           /* we do this amazing thing when x */
  359.       case y:                 /* and doodah when y */
  360.     Just put the cursor in the white space between before the command
  361.       and press "M-`".
  362.   c-header-with-text    Not bound
  363.     This is used to generate fancy headers that look like:
  364.     /* ********************************************************* */
  365.     /* ********************* Fancy Header ********************** */
  366.     /* ********************************************************* */
  367.     Just answer "Fancy Header" when you are asked for the header text.
  368.  
  369. ========================================================================
  370. ==            Mutt Mode                      ==
  371. ========================================================================
  372.  
  373. Package:    muttmode.mut
  374. How loaded: 
  375.   Autoloaded when a buffer with extension ".mut" created or when a file
  376.   is read with "-*-mutt-*-" in the first line.
  377. Modes:
  378.   Major: Mutt
  379.   Minor: none or comment
  380. Description:
  381.   Electric Mutt mode.  Pretty much the same as C mode but for Mutt code.
  382.   See muttmode.mut for more info.
  383.  
  384. ========================================================================
  385. ==            Directory Stack                      ==
  386. ========================================================================
  387.  
  388. Package:    dir.mut
  389. How loaded: Auto loaded in me2.mut.
  390. Description:
  391.   Directory stack ala c-shell (UNIX only).  The stack size is fixed but
  392.   can be easily changed in dir.mut.
  393. Functions:
  394.   cd        Auto Loaded
  395.     Change the current directory.
  396.   dirs        Not auto loaded
  397.     Show the contents of the directory stack.  The top entry is the
  398.       current directory, next is the directory you left to get to the
  399.       current directory.  Use C-l to clear the stack from the display.
  400.   pwd        Auto Loaded
  401.     Show the current directory.
  402.   pu        Auto Loaded
  403.     Change the current directory, using the stack to save the changes.
  404.     (pu directory) pushes the current directory on the stack and sets
  405.        the current directory to directory.
  406.     (pu "") swaps the top 2 entries on the stack.
  407.     (pu +n) swaps the top of the stack with the nth stack item.  n
  408.        starts at zero.
  409.   po        Not auto loaded
  410.     Discards the top entry on the stack and sets the current directory
  411.      to the new top of stack.
  412.  
  413. ========================================================================
  414. ==            Text Mode                      ==
  415. ========================================================================
  416.  
  417. Package:    textmode.mut
  418. How loaded: 
  419.   Autoloaded when a buffer with extension ".doc" or ".txt" created or
  420.   when a file is read with "-*-text-*-" in the first line.
  421. Modes:
  422.   Major: Text
  423.   Minor: none
  424. Description:
  425.   Text mode.  Help with editing documents, etc.  Does line centering,
  426.   region centering, auto word wrap, format paragraphs, mark paragraphs,
  427.   move the cursor about in a paragraph, etc.
  428. Functions:
  429.   adjust-block            M-j
  430.     Format all lines in a block (lines between dot and mark inclusive).
  431.     Uses sysvar (word-wrap) or constant fill-column as the right margin.
  432.   center-line            M-s
  433.     Center the text in the line that the cursor is on.  With C-U, center
  434.      n lines.  Uses (word-wrap) or (screen-width) as right margin.
  435.   center-region            Not bound
  436.     Center all lines in a block.
  437.   underline-line        Not bound
  438.     Underline a line of text.  All nonspace characters are underlined
  439.     with dashes.
  440.  
  441.   forward-paragraph        M-e
  442.     Attempts to move to the end of a paragraph.
  443.   backward-paragraph        M-a
  444.     Attempts to move to the begining of a paragraph.
  445.   mark-paragraph        M-h
  446.     Attempts to make the region include the paragraph the cursor is in.
  447.     Put mark at beginning of this paragraph, point at end.  If between
  448.     paragraphs, mark the next one.
  449.   cut-paragraph            Not bound
  450.     Cut to end of paragraph.
  451.   backward-cut-paragraph    Not bound
  452.     Cut back to start of paragraph.
  453.  
  454. Constants that can be set to affect text mode.
  455.   FILL-COLUMN
  456.     This is used to set the right margin in text mode.  Default is 72.
  457.   TAB-SIZE
  458.     How many spaces to use when tab is hit.  The default is 0 which
  459.     means use hard tabs (which look like 8 spaces).
  460.  
  461. System Variables
  462.   tab-size
  463.     This is set to the constant TAB-SIZE.  You can change this with
  464.     text-mode-hook.
  465.   word-wrap
  466.     This is set to the constant FILL-COLUMN.  You can change this with
  467.     text-mode-hook.
  468.  
  469. Hooks
  470.   text-mode-hook
  471.     This hook is called (if it exists) after text mode has initialized
  472.       itself.  With this hook you can override settings or do those few
  473.       extra things you wished text mode set up.  For example, this is
  474.       the perfect place to set the tab-size to what you think it should
  475.       be.
  476.     This is a program you add to your code (typically in myme.mut).
  477.     Use this hook if you don't want to modify the constants in
  478.       textmode.mut.
  479.  
  480. Customizing (usually done in text-mode-hook)
  481.   text-fill-column [int fill-column]
  482.     This is only currently used if word-wrap is 0.  It basically sets
  483.       FILL-COLUMN.
  484.     (text-fill-column) :  returns the current value of FILL-COLUMN.
  485.     (text-fill-column fill-column) : Sets FILL-COLUMN to fill-column.
  486.     Notes:
  487.       You can't call this until text mode is loaded.
  488.       I'm not real sure about the use of this.  Set it if you set
  489.     word-wrap to zero.  I'll need to think some more on how this
  490.     should work.
  491.  
  492. ========================================================================
  493. ==        Search [and Replace] Across Files              ==
  494. ========================================================================
  495.  
  496. Package:    findit.mut
  497. How loaded: Autoloaded in me2.mut
  498. Description:
  499.   Uses grep to search for a string in many files.  Once all the files
  500.     are found, the first file is visited and the string is looked for
  501.     with incremental search.  You can continue the search, edit or do
  502.     anything you want.  Once you are finished, use C-xC-n to visit the
  503.     next file containing the string.
  504.   With arg (C-u), do a search and replace across a bunch of files.  In
  505.     other aspects, acts the same as search.
  506. Functions:
  507.   findit    Not bound
  508.     Search for a string.  Use C-u for search and replace.
  509.   showit    C-xC-n
  510.     Goto the next file containing the string.
  511.  
  512. ========================================================================
  513. ==        Gomoku Game                          ==
  514. ========================================================================
  515.  
  516. Package:    gomoku.mut
  517. How loaded: Manually
  518. Description:
  519.   GNU Emacs Gomoku is a game played between two players (one of which is
  520.     ME) on a rectangular board.  Each player, in turn, marks a free
  521.     square of its choice.  The winner is the first one to mark five
  522.     contiguous squares in any direction (horizontally, vertically or
  523.     diagonally).
  524.   For more info, "use the source, Luke".
  525. Functions:
  526.   gomoku    Not bound
  527.  
  528. ========================================================================
  529. ==        Hide Buffers                          ==
  530. ========================================================================
  531.  
  532. Package:    hidebuf.mut
  533. How loaded: part of me2.mut
  534. Description:
  535.   Implements a "soft" buffer hidden bit.  Buffers can be put aside for a
  536.   little while and restored later.  I use this as a kind of workspace
  537.   manager - when I go off on a tangent, I can hide the files I'm working
  538.   on and when I've finished, unhide the files and pick up where I left
  539.   off.  Hiding files gets them out of the way of your current work.
  540. Functions:
  541.   next-buffer        F-2
  542.     Find the next unhidden buffer and make it the current one.  Next
  543.     means alphabetically.  With this routine, you can just bang on
  544.     function key 2 to move though all the buffers.
  545.   prev-buffer        Not bound
  546.     Find the previous unhidden buffer and make it the current one.
  547.   hide-buffer        M-h
  548.     Hide the current buffer.
  549.   unhide-buffer        Not bound
  550.     Unhide a buffer by name.
  551.   unhide-buffers    Not bound
  552.     Unhide all buffers.
  553.  
  554. ========================================================================
  555. ==            Hook Support                      ==
  556. ========================================================================
  557.  
  558. Package:    hook.mut
  559. How loaded: part of me2.mut.
  560. Description:
  561.   Provides support for the hooks that ME2 calls:  enter-ME-hook,
  562.     leave-ME-hook, process-hook, buffer-created-hook and read-file-hook.
  563.     In addition, it creates two hooks of its own for interactive
  564.     buffers:  Ibuffer-created-hook and Iread-file-hook.
  565.   The interactive hooks are called for buffers that have the Interactive
  566.     bit set.  See buffer-flags in ME2MUTT.DOC of some more info.
  567.   If you program uses a hook, it should register the hook (probably in a
  568.     MAIN routine).  In this way, many programs can share hooks with a
  569.     minimum of fuss.
  570.   I don't support two hooks:
  571.     - modeline-hook : Needs to be handled differently.  See modeline.mut.
  572.     - key-pressed-hook : Slows things down too much.  Your on your own.
  573. Functions:
  574.   (register-hook hook-id name-of-routine-to-call)    Not bound
  575.     Get the hook-id out of me2.h.  name-of-routine-to-call is string.
  576.     Must not be Hidden.
  577.  
  578. ========================================================================
  579. ==        Mail Mode                          ==
  580. ========================================================================
  581.  
  582. Package:    mailmode.mut
  583. How loaded: Auto loaded or via the MEMODE environment variable
  584. Modes:
  585.   Major: Text
  586.   Minor: Mail
  587. Description:
  588.   A minor mode of text-mode.
  589.   A [short] set of programs that make it a bit easier to work with
  590.     electronic mail or Usenet notes.
  591. Functions:
  592.   mail-mode    Not bound
  593.     Turns on mail mode.
  594.     Here are two way to get mail-mode turned on automatically when you
  595.       edit mail:
  596.     set-mode (in alamode.mut) sets this mode if the environment variable
  597.       MEMODE is set to "mail".  In my .profile, I have:
  598.     EDITOR=$HOME/bin/me2
  599.     MAILER=mailx
  600.       In .kshrc:
  601.     alias mail="MEMODE=mail   $MAILER"
  602.       Thus, whenever I type "mail" and get into the editor, I get ME2 in
  603.       mail-mode.
  604.     Another (better) way to do this is to note the name the mailer uses
  605.       for temporary files (the ones it uses to hold the mail you are
  606.       editing).  I use mailx and the form is:  "/tmp/Re<digits>".  So,
  607.       to get mail-mode when editing mail, add
  608.      (auto-mode-list TRUE
  609.        'Re[0-9]+$'  "mail"        ;; mailx:  "/tmp/Re<digits>"
  610.      )
  611.       to your startup file (myme.mut).
  612.   mail-format-quote-region    M-`    (meta backquote)
  613.     Format a region-block (all lines in region) and put a prefix
  614.       (default is "> ") in front of each line.  With arg (C-u), askes
  615.       what to use as a prefix.
  616.     This is very handy when want to reply to something that was sent to
  617.       you.  You can cut out the relevant chunk and have it formated
  618.       nicely.  If you are replying to serveral people in the same
  619.       letter, use the arg option - this allows you to prefix everything
  620.       Peter says with something like "Peter> " so that everybody
  621.       receiving your mail will know who said what.  You can change the
  622.       default by changing "quoter" in mailmode.mut.
  623.   mail-quote-region    Not bound
  624.     Put the prefix in front of every line in the region.  No formating.
  625. Constants:
  626.   quoter : The default string that is used when quoting text.
  627.     Initially "> ".
  628.  
  629. ========================================================================
  630. ==        Read Only Buffers                      ==
  631. ========================================================================
  632.  
  633. Package:    nomunge.mut
  634. How loaded: Autoloaded in me2.mut
  635. Description:
  636.   An attempt at a read only mode for buffers and files.  Its not very
  637.   robust but works OK for people who aren't trying to mess with the
  638.   buffer.  At any rate, they can't write the file out so any buffer
  639.   changes won't change the file.
  640. Functions:
  641.   buffer-nomunge    Not bound  Autoloaded
  642.     Rebind a bunch of keys to make it hard to change buffer contents
  643.     accidentally.
  644.  
  645. ========================================================================
  646. ==        Picture Mode                          ==
  647. ========================================================================
  648.  
  649. Package:    picture.mut
  650. How loaded: Auto loaded in me2.mut
  651. Description:
  652.   GNU Emacs Picture mode.  This mode is used to edit tables, text
  653.     pictures, etc.  Well documented in picture.mut or use the GNU Emacs
  654.     manual.
  655.   I've added a picture function that I find useful:  picture-box.
  656.   Note:  My port is something of a quick hack.  I didn't implement
  657.     rectangle registers (I put everything into the cut buffer).  I don't
  658.     use picture mode all that much and so haven't really beat on it.
  659.     In my limited testing, everything seems to work but I'm sure there
  660.     some things I missed.
  661. Functions:
  662.   edit-picture        Not bound  Autoloaded
  663.   picture-box        Not bound
  664.     Draw a box around the rectangle region.
  665.  
  666. ========================================================================
  667. ==        External Processes                      ==
  668. ========================================================================
  669.  
  670. These two packages use the compute server.  See me2mutt.doc and
  671. comserver.doc for more info on what it does and how to run it.
  672.  
  673. Package:    compile.mut
  674. How loaded: compile and grep are autoloaded in me2.mut
  675. Description:
  676.   Run a compile, grep or just about any output only process (such as
  677.     "ls" or "cc"), collect the output and optionally visit each line in
  678.     each file that is flagged.
  679.   Output is collected as the compile sends it out - you can still edit
  680.     normally.  This a "multiprocessing" compile - many things are going
  681.     on at once.  Note that ME only processes the compile output when
  682.     nothing else is happening - if a Mutt program is running or ME is
  683.     waiting for you (eg waiting for you to answer a question in the
  684.     minibuffer), compile output is queued and will be processed when
  685.     things are quiet again.  The *Compile* window can be removed from
  686.     the screen without affecting things.  DON'T delete the *Compile*
  687.     buffer (until to compile is done and you don't care about the
  688.     output).
  689.   Modeled after grep and compile in GNU Emacs.
  690.   This stuff only works on machines running unix (at least until
  691.     somebody ports the compute server to other OSes).
  692.   The compute server must be running.  It is what actually runs the
  693.     compiles - ME just processes the output.  See create-process in
  694.     ME2MUTT.DOC for how to run the compute server.
  695. Functions:
  696.   compile        Not bound    Autoloaded
  697.     Run a command, in a shell and put the output in the *Compile*
  698.       buffer.  You can run things like make, "cc -o foo foo.c", ls or
  699.       just about anything that is output only (can't send input to the
  700.       remote processes).  Since the command is run in a shell (sh), you
  701.       can use things like $HOME, *.c, etc.
  702.     Use compile-next-error to step through the errors.
  703.   grep            Not bound    Autoloaded
  704.     Run grep, collect the output and use compile-next-error to step
  705.       through the matches.
  706.   stop-compile        Not bound
  707.     Stop the process running in the *Compile* buffer.
  708.   compile-next-error    C-x`  (control-X backquote)
  709.     Looks in the *Compile* buffer, makes a list of errors (or grep
  710.       matches), visits the file(s) with the error(s) and puts the cursor
  711.       at the bogus line.  Each time you press C-X`, the cursor moves to
  712.       the next error.  You can edit as much as you like at each error.
  713.       You can start using C-X` before the compile is done (it is
  714.       possible for the error list to get out of sync if you change a
  715.       file before the compiler is done with it but that should be a
  716.       minor problem).
  717.     Knows how to parse the output of:  mc2, grep, HP-UX 8.0 cc, Apollo
  718.       cc and hopefully other compilers.  I tried to match what GNU Emacs
  719.       does but working with regular expressions can be a real pain in
  720.       the butt so there might be some bugs in here.  Apollo cc is a real
  721.       pain.
  722.     Doesn't know about ld:  If you have loader errors, you won't see
  723.       them if you remove the *Compile* window or shrink it so you can't
  724.       read all of it.  I usually just look at the *Compile* buffer to
  725.       make sure all went as expected.
  726. Hooks
  727.   process-hook is used to capture the output of the compile or grep.
  728.  
  729.  
  730. Package:    shell.mut
  731. How loaded: Manually
  732. Description:
  733.   Attempts to make it easy to run output only programs in a buffer.
  734.   Its a quick hack but might be interesting.
  735. Functions:
  736.   shell-shock        Not bound
  737. Hooks
  738.   process-hook is used to capture the output of the command.
  739.  
  740. ========================================================================
  741. ==        Tags                              ==
  742. ========================================================================
  743.  
  744. Package:    tags.mut
  745. How loaded: manually
  746. Description:
  747.   Tags are a small database for C functions.  Have you ever edited some
  748.     C code and come across a function and say to yourself "I wonder
  749.     where this function is?", well, tags can help answer that for you.
  750.   Tags uses the Unix ctags command.
  751.   To start things, create the tags database:
  752.     In the current directory: "ctags -xtw files.[ch] >Tags"
  753.     In a subtree: "find . -name '*.[ch]' -print | xargs ctags -xtw >Tags"
  754.     Keep the tags file in the directory it is created in.
  755.   When the tags code is loaded, it will ask you what directory the tags
  756.     file is in.  If you are not going to be changing directories, you
  757.     can use ".".  If you might, give the full path name for the
  758.     directory (file name completion is on).  Remember to only give the
  759.     directory name.
  760. Functions:
  761.   goto-tag        M-.
  762.     Look up a keyword in the tags data base, visit the file it is
  763.       defined in and put the dot at the start of the routine.
  764.     If just hit return when asked for the tag, the word after the dot is
  765.       used.  This is nice for things like:
  766.         foobar(fred,sam);
  767.     ^ dot
  768.       Hit M-. <enter> and you will in the file that foobar is defined
  769.       in.
  770.   select-tag-file    Not bound
  771.     Load the tags database.  See above.  If you want to change to a new
  772.     database, just run this again.
  773.   where-is-tag        Not bound
  774.     Shows the file that the tag is defined in.  As in goto-tag but just
  775.     tells you the file instead of editing it.
  776.  
  777. ========================================================================
  778. ==        OS Stuff                          ==
  779. ========================================================================
  780.  
  781. Package:    unix.mut
  782. How loaded: 
  783.   Compiled and unix.mco is renamed to osstuff.mco.  osstuff.mco is
  784.   loaded by me2.mut.
  785. Description:
  786.   osstuff is a file that is loaded so you have a place to put all your
  787.   OS specific code.  When you use ME on a variety of machines, this is
  788.   very handy.
  789. Functions (unix.mut):
  790.   chmod        Not bound
  791.     Runs change mode on the file connected to the current buffer.  Real
  792.     handy when you check out a file, read it in, edit it and when you
  793.     try to save you find out it is read-only.  ick.  Just run chmod and
  794.     enter "a+w" and then save it.
  795.   Some stuff to try and figure out the termainal type.
  796.  
  797. ========================================================================
  798. ==        VT100 Type Termainals                      ==
  799. ========================================================================
  800.  
  801. Package:    xterm.mut
  802. How loaded:
  803.   In unix.mut.  The environment variable "TERM" is looked at to try and
  804.   figure out if this file should be loaded.
  805. Description:
  806.   Some terminals support function keys, arrow keys, etc.  This file adds
  807.     some support for xterm, vt100 and ansi style termainals.
  808.   Decodes arrow keys and function keys (those keys that send out "Escape
  809.     [ ...").
  810.  
  811. ========================================================================
  812. ==        HP Terminal Support                      ==
  813. ========================================================================
  814.  
  815. Package:    hpterm.mut
  816. How loaded: 
  817.   In unix.mut.  The environment variable "TERM" is looked at to try and
  818.   figure out if this file should be loaded.
  819. Description:
  820.   Try and sent up a HP terminal so ME can understand it when you press a
  821.   function or arrow key.  HP terminals make life difficult for Emacs
  822.   because the function keys send out text that is the same as other
  823.   Emacs commands.  It can be very hard to tell if you pressed down arrow
  824.   or M-b (which do two very different things).
  825.  
  826.   In order for this stuff to work, you must be using a version of ME
  827.   that knows about HP terminals.  You can turn this on in config.h.
  828.  
  829. ========================================================================
  830. ==        Window Scrolling                      ==
  831. ========================================================================
  832.  
  833. Package:    wscroll.mut
  834. How loaded: manually
  835. Description:
  836.   Some routines to move the current window right or left.
  837. Functions:
  838.  scroll-right        C-x<
  839.  scroll-left        C-x>
  840.    Manually scroll the current window horizontally.
  841.    Trys to keep the cursor on screen to prevent the update routines from
  842.      undoing the scroll.
  843.  cursor-is-right    Not bound
  844.  cursor-is-left        Not bound
  845.    Shift the window so that the cursor is at the right or left margin
  846.      (if possible).
  847.  center-screen-around-cursor-horizontally    Not bound
  848.    Try and put the cursor in the middle of the screen.
  849.